/*************************************************
Author: will
Date: 11/13/2012
Description:
Notes: 
*************************************************/

#ifndef __CSoulMgr_h__
#define __CSoulMgr_h__

#include "CSoulConfig.h"
#include "MsgComm.pb.h"

namespace CTLib
{
    class CEnpNetHead;
}
class PBMsgHead;
class MsgSoulInfo;
class CPlayerAttr;
class MsgBallInfo;
class CSoulMgr
{
public:
    CSoulMgr()
    {

    }

    int LoadConfig(const char* szCfgPath);

    //解除封印
    int LevelUp(CPlayerSoulData& stSoulData, int& iHunli, unsigned short usRoleLevel, unsigned char ucBallID, bool& bStatUp, MsgBallInfo& stMsgBallInfo);

    int GetBallTotal(CPlayerSoulData& stSoulData, unsigned char ucBallID, CPlayerAttr& stPlayerAttr);
    int GetBallLevel(CPlayerSoulData& stSoulData, unsigned char ucBallID, CPlayerAttr& stPlayerAttr);

    //检查是否可以使用该技能
    bool CanUseSkill(CPlayerSoulData& stSoulData, unsigned char ucCareer, unsigned int uiSkillID);

    //获取魂器信息
    int GetSoulInfo(CPlayerSoulData& stSoulData, MsgSoulInfo& stSoulInfo);

    //获取属性
    int GetSoulAttr(CPlayerSoulData& stSoulData, CPlayerAttr& stAttr);

    //获取可用的魂器技能列表
    int GetSoulSkillList(CPlayerBaseInfo& stPlayerBaseInfo, CPlayerDetailInfo& stPlayerDetailInfo, ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& stSkillIDList);

private:
    CSoulBallConfig _stSoulBallConfig;
    CSoulStatConfig _stSoulStatConfig;
};


#endif // __CSoulMgr_h__

